// NamedPipeServer.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "NamedPipe.h"

int main(int argc, char* argv[])
{
	printf("Hello World!\n");
	DefaultNamedPipeServerParams params;
	Pipe *lpNamedPipeServer = NamedPipe::CreateServerAndConnect("\\\\.\\Pipe\\hulucc", params);
	printf("ServerStart\n");
	while(TRUE)
	{
		BYTE test[1] = {0};
		lpNamedPipeServer->SyncRead((LPVOID)test, 1);
		printf("%d\n", test[0]);
		Sleep(100);
	}
	return 0;
}

